/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.apt.RegisterAction;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apt.Bean.Bean;

/**
 *
 * @author MinhThang
 */
public class RegisterAction extends org.apache.struts.action.Action {
    
    /* forward name="success" path="" */
    private static final String SUCCESS = "success";
   
    @Override
    public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        Bean f=(Bean)form;
        if(f.Register()){
            return mapping.findForward(SUCCESS);
        }else{
            return mapping.findForward("false");
        }
    }
}
